package com.lynx.system.feign;

import com.lynx.system.beans.Menu;
import com.lynx.system.beans.Type;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient(value = "menu")
public interface MenuFeign {
    @GetMapping("/menu/findAll/{index}/{limit}")
    public Object findAll(@PathVariable int index,@PathVariable int limit);
    @DeleteMapping("/menu/deleteById/{id}")
    public Object deleteById(@PathVariable int id);
    @GetMapping("/menu/findTypes")
    List<Type> findTyps();

    @PostMapping("/menu/save")
    public int save(Menu menu);
    @GetMapping("/menu/findById/{id}")
    public Menu findById(@PathVariable int id);
    @PostMapping("/menu/edit")
    public int edit(Menu menu);
}
